/***************************************************************************
 创建者: 华磊
 开始时间: 2020.8.14
 copyright: (C) 华友高科
 修改说明: (每次有修改就添加一条，带有 修改人，修改时间，修改描述)
 example (1) hualei 2020.5.8 类的具体实现代码编写

 ***************************************************************************
 *  @file globalDefine.h
 *  功能:通用数据结构，　全部为算法用
 *
 *                                                                         *
 ***************************************************************************/
#ifndef GLOBALDEFINE_H
#define GLOBALDEFINE_H
#include <vector>
#include <string>
#define D_MAX_CARVE_NUM 20
enum E_WAVE_STATUS
{
    E_WAVE_STATUS_STOPED,
    E_WAVE_STATUS_TOSTOP,
    E_WAVE_STATUS_TORUN,
    E_WAVE_STATUS_RUNNING,
    E_WAVE_STATUS_CEASED,
    E_WAVE_STATUS_TOCEASE,

};

struct TcDebugInfo
{
    double cycle_time;
    //Position stuff
    double target;          // actual segment length
    double progress;        // where are we in the segment?  0..target
    double nominal_length;

    //Velocity
    double reqvel;          // vel requested by F word, calc'd by task
    int isInReqLimit;
    double target_vel;      // velocity to actually track, limited by other factors
    double maxvel;          // max possible vel (feed override stops here)
    double currentvel;      // keep track of current step (vel * cycle_time)
    double finalvel;        // velocity to aim for at end of segment
    double term_vel;        // actual velocity at termination of segment
    double kink_vel;        // Temporary way to store our calculation of maximum velocity we can handle if this segment is declared tangent with the next

    //Acceleration
    double maxaccel;        // accel calc'd by task

    int id;                 // segment's serial number
//    struct state_tag_t tag; /* state tag corresponding to running motion */

    int coords;

    int motion_type;       // TC_LINEAR (coords.line) or
                            // TC_CIRCULAR (coords.circle) or
                            // TC_RIGIDTAP (coords.rigidtap)
    int active;            // this motion is being executed
    int canon_motion_type;  // this motion is due to which canon function?
    int term_cond;          // gcode requests continuous feed at the end of
                            // this segment (g64 mode)

    int blending_next;      // segment is being blended into following segment
    double blend_vel;       // velocity below which we should start blending
    double tolerance;       // during the blend at the end of this move,
                            // stay within this distance from the path.
    int synchronized;       // spindle sync state
    double uu_per_rev;      // for sync, user units per rev (e.g. 0.0625 for 16tpi)
    double vel_at_blend_start;
    int sync_accel;         // we're accelerating up to sync with the spindle
    unsigned char enables;  // Feed scale, etc, enable bits for this move
    int atspeed;           // wait for the spindle to be at-speed before starting this move
//    syncdio_t syncdio;      // synched DIO's for this move. what to turn on/off
    int indexrotary;        // which rotary axis to unlock to make this move, -1 for none
    int optimization_state;             // At peak velocity during blends)
    int on_final_decel;
    int blend_prev;
    int accel_mode;
    int splitting;          // the segment is less than 1 cycle time
                            // away from the end.
    int remove;             // Flag to remove the segment from the queue
    int active_depth;       /* Active depth (i.e. how many segments
                            * after this will it take to slow to zero
                            * speed) */
    int finalized;

    // Temporary status flags (reset each cycle)
    int is_blending;
};

struct TpDebugInfo
{
    double currentPos[9];
    double goalPos[9];

    int queueSize;
    double cycleTime;

    double vMax;		/* vel for subsequent moves */
    double ini_maxvel;          /* max velocity allowed by machine
                                   constraints (ini file) for
                                   subsequent moves */
    double vLimit;		/* absolute upper limit on all vels */

    double aMax;        /* max accel (unused) */
    //FIXME this shouldn't be a separate limit,
    double aMaxCartesian; /* max cartesian acceleration by machine bounds */
    double aLimit;        /* max accel (unused) */

    double wMax;		/* rotational velocity max */
    double wDotMax;		/* rotational accelleration max */
    int nextId;
    int execId;
//    struct state_tag_t execTag; /* state tag corresponding to running motion */
    int termCond;
    int done;
    int depth;			/* number of total queued motions */
    int activeDepth;		/* number of motions blending */
    int aborting;
    int pausing;
    int motionType;
    double tolerance;           /* for subsequent motions, stay within this
                                   distance of the programmed path during
                                   blends */
    int synchronized;       // spindle sync required for this move
    int velocity_mode; 	        /* TRUE if spindle sync is in velocity mode,
                   FALSE if in position mode */
    double uu_per_rev;          /* user units per spindle revolution */

    double old_spindlepos; // temporary in tpUpdateRigidTapState

};

struct EmcDebugInfo
{
    TpDebugInfo tpInfo;
    TcDebugInfo tcInfo;
};


enum E_MOVE_STAGE
{
    E_MOVE_STAGE_NONE,
    E_MOVE_STAGE_GOMOVE_BEGIN,
    E_MOVE_STAGE_MOVE_HOLDING,
    E_MOVE_STAGE_STOPMOVE_BEGIN,

};


enum E_IMU_VENDOR_ID
{
    E_IMU_VENDOR_ID_NONE=0,
    E_IMU_VENDOR_ID_WIT=1,//深圳维特智能WT61C232

};
enum E_FIXTURE_TYPE
{
    E_FIXTURE_TYPE_HORRIZENTATION,//水平安装
    E_FIXTURE_TYPE_VERTICAL_Y,//y轴垂直向天安装
};

struct ImuDataInfo
{
    double yaw;//偏航degree
    double pitch;
    double roll;
    double rotateVel_x;
    double rotateVel_y;
    double rotateVel_z;
    double acc_x;
    double acc_y;
    double acc_z;
    double timeStamp;
    int requestCount;
};



enum E_VELOCITY_TYPE
{
    E_VELOCITY_TYPE_TAPE,
    E_VELOCITY_TYPE_SPLINE,
    E_VELOCITY_TYPE_IMPROVED_SPLINE,
    E_VELOCITY_TYPE_SIN,
};


enum E_WAVE_TYPE
{
    E_WAVE_TYPE_NONE=0,
    E_WAVE_TYPE_SIN_X=1,
    E_WAVE_TYPE_SIN_Y=2,
    E_WAVE_TYPE_CIRCLE_P=3,
    E_WAVE_TYPE_CIRCLE_N=4,
    E_WAVE_TYPE_DOUBLECIRCLE=5,
    E_WAVE_TYPE_DOUBLECIRCLE_Y=6,

};

//struct PathMovingInfo
//{
//    int passedStationId;//最后经过的站点id，负数代表未知
//    int nextStationId;//下一个站点id，负数代表未知
//    int currentStationId;//当前所在的站点id，负数表示不在站点
//    int passedPathId;//最后经过的路径id，负数代表未知
//    int nextPathId;//下一个路径id，负数代表未知
//    int currentPathId;//当前所处的路径id，负数表示不在任何路径
//};

struct RegulatorConfigInfo
{
    bool isValid;
    double feedforward;
    double propotial;
    double integration;
    double errorLimitForIntegration;
    double differential;
    double minOutput;
    double maxOutput;
};

enum E_REGULATOR_STATUS
{
    E_REGULATOR_STATUS_STOPED,
    E_REGULATOR_STATUS_RUNNING,
    E_REGULATOR_STATUS_ERROR

};

enum E_REGULATOR_TYPE
{
    E_REGULATOR_TYPE_POSITION,
    E_REGULATOR_TYPE_VELOCITY,
};

struct RegulatorDebugInfo
{
    double targetPosition;
    double feedbackPosition;
    double velCommand;

    int axisId;
    double deltaTime;
    RegulatorConfigInfo configInfo;
    E_REGULATOR_STATUS status;
    E_REGULATOR_TYPE regulatorType;
};


enum E_LASER_FILTER_TYPE
{
    E_LASER_FILTER_TYPE_NONE,
    E_LASER_FILTER_TYPE_VMARK,
    E_LASER_FILTER_TYPE_REFLECT,
};


enum E_LOCATION_TYPE
{
    E_LOCATION_TYPE_FRONT,
    E_LOCATION_TYPE_BACK,
    E_LOCATION_TYPE_LEFT,
    E_LOCATION_TYPE_RIGHT,
    E_LOCATION_TYPE_FRONT_LEFT,
    E_LOCATION_TYPE_FRONT_RIGHT,
    E_LOCATION_TYPE_BACK_LEFT,
    E_LOCATION_TYPE_BACK_RIGHT
};


struct IoLaserPara
{
    std::string laserName;
    E_LOCATION_TYPE laserLocationType;
    bool isLowValid;//类似急停，低代表有效信号
    int laserOutputCount;//雷达输出２路或３路
    int laserDi1_index;
    int laserDi2_index;
    int laserDi3_index;
    int laserDi4_index;
    int laserDo1_index;
    int laserDo2_index;
    int laserDo3_index;
    int laserDo4_index;
    bool isRotateValid;//旋转时是否检测该信号

};



struct BeltObjectInfo
{
    int beltIndex;
    double pos_x_pix;
    double pos_y_pix;
    double pos_r;
    long long latch_encoderValue;
};

struct VisionObjectInfo
{
    int beltIndex;
    double pos_x;//mm
    double pos_y;//mm
    double pos_r;//degree
    int latch_encoderValue;
    bool isQualified;
};


struct SdoConfig
{
    int index;
    int subindex;
    int byteLength;
    int value;
};



enum E_BARRIER_RUN_MODE
{
    E_BARRIER_RUN_MODE_NONE=-1,//不检查障碍物
    E_BARRIER_RUN_MODE_COMMON=0,
    E_BARRIER_RUN_MODE_VMARK=1,//侧边距离紧贴
    E_BARRIER_RUN_MODE_NARROW_A=2,//超窄a
    E_BARRIER_RUN_MODE_NARROW_B=3,//超窄b
    E_BARRIER_RUN_MODE_DONOTHING=4,//不改变壁障策略
};
//class MapPath
//enum E_PATH_BARRIER_TYPE
//{
//    E_PATH_BARRIER_TYPE_NODETECT,
//    E_PATH_BARRIER_TYPE_COMMON,
//    E_PATH_BARRIER_TYPE_NARROW,
//    E_PATH_BARRIER_TYPE_NARROW_A,
//    E_PATH_BARRIER_TYPE_NARROW_B,
//    E_PATH_BARRIER_TYPE_DONOTHING
//};

struct BiasControlInfo
{
    double deltaDistanceX;
    double deltaDistanceY;
    double deltaAngle;
    double forward_x;//m/s ，前馈量
    double forward_y;//m/s ，前馈量
    double forward_r;//rad/s，前馈量
    double absoluteDistance;
    double absoluteAngle;
    bool isPositiveDirection;
    bool isPidStop;
    double distanceFollowError;
    double angleFollowError;
    int  calculateBiasType;
};

struct TrackPidInfo
{
    double pid_p;
    double pid_i;
    double pid_d;
    double errorLimitForIntegration;
    double feedforward;
    double pid_velocity_p;
    double lineAdjustMax;
    double rotationAdjustMax;
};

struct QrcodeDetectParameter
{
    double allowMinArea;
    double allowMaxArea;
    double allowMinLength;
    double allowMaxLength;
    double colorThrehold;
};

// 电池状态
enum E_BATTERY_STATUS
{
    E_BATTERY_STATUS_NORMAL,            //正常
    E_BATTERY_STATUS_WARNNING,          //警告
    E_BATTERY_STATUS_NEED_GO_CHARGE,    //需要充电
    E_BATTERY_STATUS_CHARGING,          //正在充电
    E_BATTERY_STATUS_SHUTDOWN,          //关机
    E_BATTERY_STATUS_ERROR              //错误

};

// 电池组信息
struct BatteryInformation
{
    double batteryTempture;                     //电池组内部温度,unit is 摄氏度
    double batterySumVoltage;                   //电池组总电压,unit is V
    double batteryCurrentCurrency;              //电池组实时电流, unit is A
    double batteryLeftLightmodRatio;            //电池组相对剩余容量百分比，１表示充满
    double batteryLeftLightmodVolume;           //电池组剩余容量, unit is AH
    double batteryCycleNumber;                  //电池组循环次数
    double batteryDesignVolume;                 //电池组设计容量, unit is AH
    unsigned short manufatureData; //制造日期
    unsigned int balanceStatus;//均衡状态
    unsigned short errorStatus;//安全状态
    unsigned char softWareVersition;//软件版本
    unsigned char fet;//mos开关状态
    unsigned char batterySerialCount;//电池串数
    unsigned char ntcCount;//ntc温度传感器个数
    std::vector <double> ntcData; //ntc温度数据
    std::vector <double> batteryOnePartVoltage;     //电池组7节电池各电压
};



enum E_MOTOR_CONTROL_MODE
{
    E_MOTOR_CONTROL_START=0,
    E_MOTOR_CONTROL_POSITION_MODE=1,
    E_MOTOR_CONTROL_VELOCITY_MODE=2,
    E_MOTOR_CONTROL_TORQUE_MODE=3,
    E_MOTOR_CONTROL_CSP_MODE=4,
    E_MOTOR_CONTROL_CSV_MODE=5,
    E_MOTOR_CONTROL_CST_MODE=6,
    E_MOTOR_CONTROL_VIRTUAL=7,
    E_MOTOR_CONTROL_HOMING=8,
    E_MOTOR_CONTROL_END=9

};


enum E_TRACK_STATUS
{
    E_TRACK_STATUS_CEASED,
    E_TRACK_STATUS_STOPPED,
    E_TRACK_STATUS_RUNNING, 
    E_TRACK_STATUS_PASSOVER,
    E_TRACK_STATUS_GOAL_REACHED,
    E_TRACK_STATUS_ERROR

};

enum E_TRACK_MODE
{
    E_TRACK_MODE_NONE,
    E_TRACK_MODE_MAGENETIC_MIDDLE,
    E_TRACK_MODE_MAGENETIC_LEFT,
    E_TRACK_MODE_MAGENETIC_RIGHT,
    E_TRACK_MODE_VIRTUAL_LINE,
};

enum E_TRACK_STOP_CONDITION
{
    E_TRACK_STOP_CONDITION_NONE,
    E_TRACK_STOP_CONDITION_RFID, //第一个RFID减速到ＲＦID数值，第二个停
    E_TRACK_STOP_CONDITION_MAGANETIC_WIDTH,//变宽后先减速，变窄后停
    E_TRACK_STOP_CONDITION_INPUT,//开关信号
    E_TRACK_STOP_CONDITION_VIRTUAL_LINE,//虚拟线控制，接近目的地减速，到达目的点停止
};

enum E_STOP_STATUS
{
    E_STOP_STATUS_NORMAL,
    E_STOP_STATUS_SLOWDOWN,
    E_STOP_STATUS_REACHED,
    E_STOP_STATUS_ERROR,
};

enum MOVE_FREE_POINT_TYPE
{
    EM_MOVE_FREE_NOPOINT=0,               //空点
    EM_MOVE_FREE_DP=1,                    // 普通单点
    EM_MOVE_FREE_QR=2,                    // 二维码点
    EM_MOVE_FREE_VMARK=3,                  // VMark点
    EM_MOVE_FREE_CU1=4,                   //CU1点
    EM_MOVE_FREE_REFLECT=4,                   //反光条点
};

struct DPoint
{
    std::string mapName;
    double posX;//mm, modify by hualei
    double posY;//mm, modify by hualei
    double posR;//deg
    int dpIndex;//点索引
    MOVE_FREE_POINT_TYPE pointType;//点类型。
};

enum E_NAV_COMMAND //ENUM_MOVE_FREE_MOVE_TRAJECTORY_TYPE必须同步定义
{
    E_NAV_COMMAND_NONE=-1,//无轨迹
    E_NAV_COMMAND_AUTO=0,//不使用
    E_NAV_COMMAND_LINE=1,
    E_NAV_COMMAND_SPLINE=2,
    E_NAV_COMMAND_ROTATE=3,//原地旋转
};

struct NavParameter
{
    E_NAV_COMMAND moveType;//0 Auto ,1 直线，２样条曲线
    int velocityUnit;
    float velocity;//%,m/s
    struct DPoint targetPoint;
    bool isPositiveDirection;//前进或倒退
    int cntRatio;
    float acc;
    int lineNumber;
    int incFlag;
    int pathFlag;
    int stationId;//站点号
    int pathId;//路径号
    //    double controlPointRatio1;//样条曲线开始控制比例
    //    double controlPointRatio2;//样条曲线结束控制比例
    //    bool isRotatePrepare;//是否旋转准备姿态。
    //    double prepareAngle;//rad, 准备姿态角度。
        double p1x;
        double p1y;
        double p2x;
        double p2y;
};



enum E_VIRTUAL_LINE_CONTROL_STATUS
{
    E_VIRTUAL_LINE_CONTROL_INITIAL = 11,
    E_VIRTUAL_LINE_CONTROL_RUN = 1,
    E_VIRTUAL_LINE_CONTROL_TOSTOP = 12,
    E_VIRTUAL_LINE_CONTROL_STOPPING = 13,
    E_VIRTUAL_LINE_CONTROL_STOPPED = 0,
    E_VIRTUAL_LINE_CONTROL_TOCEASE = 14,
    E_VIRTUAL_LINE_CONTROL_CEASING = 15,
    E_VIRTUAL_LINE_CONTROL_CEASED = 2
};

struct LaserDataInfo
{
    float angle_min;//        # start angle of the scan [rad]
    float angle_max;//        # end angle of the scan [rad]
    float angle_increment;// # angular distance between measurements [rad]
    float time_increment;//  # time between measurements [seconds] - if your scanner
                             //# is moving, this will be used in interpolating position
                            // # of 3d points
    float scan_time;//        # time between scans [seconds]
    float range_min;//        # minimum range value [m]
    float range_max;//        # maximum range value [m]
    std::vector<float> ranges ;//        # range data [m] (Note: values < range_min or > range_max should be discarded)
    std::vector<float> intensities;//
};

struct MapRegion
{
    float originX;
    float originY;
    float width;
    float height;
};


struct LaserDriverConfig
{
    bool isUseInternalDriver;
    int venderId;//1 sick,2 北阳，3 倍加福，4 科力
    int typeId;//1 tim5xx
    double min_ang;
    double max_ang;
    double range_min;
    double range_max;
    bool intensity;
    int skip;
    std::string topicName;//话题名称
    std::string frame_id;//雷达tf坐标名称（不同于话题名称）
    double time_offset;
    bool publish_datagram;
    bool subscribe_datagram;
    int device_number;
    std::string hostname;
    std::string port;
    int timelimit;
    bool auto_reboot;
};

struct LaserScanDeviceInfo
{
    int vendorId;
    double pose_x;//unit is m
    double pose_y;//unit is m
    double pose_z;//unit is m
    double pose_yaw;//unit is rad
    double pose_pitch;//unit is rad
    double pose_roll;//unit is rad
    int isInUse;
    int skipInterval;
    int isEnableFlyPointDelete;
    double flyPoint_allowMiniumAngle;//unit is rad
    double laserMinAngle;//unit is rad
    double laserMaxAngle;//unit is rad
    std::string laserLaunchCommand;
    std::string laserScanName;//topic话题名称
    LaserDriverConfig driverConfig;
};

enum E_VEHICLE_POSITION_TYPE
{
    E_VEHICLE_POSITION_TYPE_DEFAULT=0,
    E_VEHICLE_POSITION_TYPE_ROS=1,
    E_VEHICLE_POSITION_TYPE_ENCODER_ODOM=2,
    E_VEHICLE_POSITION_TYPE_IMU_ODOM=3,
    E_VEHICLE_POSITION_TYPE_VISION_MATCH=4,
    E_VEHICLE_POSITION_TYPE_PCL_MATCH=5,
    E_VEHICLE_POSITION_TYPE_VMARK=6,
    E_VEHICLE_POSITION_TYPE_UWB=7,
    E_VEHICLE_POSITION_TYPE_PREDICTION=8,
    E_VEHICLE_POSITION_TYPE_QRCODE=9,
    E_VEHICLE_POSITION_TYPE_CU1=10,
};



enum E_MATCH_CALCULATE_METHOD
{
    E_MATCH_CALCULATE_METHOD_SURF ,
    E_MATCH_CALCULATE_METHOD_SURF_LOWE ,
    E_MATCH_CALCULATE_METHOD_SIFT ,
    E_MATCH_CALCULATE_METHOD_SIFT_LOWE,
    E_MATCH_CALCULATE_METHOD_ORB ,
    E_MATCH_CALCULATE_METHOD_FAST ,
    E_MATCH_CALCULATE_METHOD_HARRIS ,
    E_MATCH_CALCULATE_METHOD_VMARK ,
};

struct MatchCalculationParameter
{
    E_MATCH_CALCULATE_METHOD method;
    int keyPointFactor; // 海塞矩阵阈值，在这里调整精度，值越大点越少，越精准
    float matchFactor;//越小点越少，精度越好
    float minScale;
    float maxScale;
};

enum E_PCL_ICP_METHOD
{
    E_PCL_ICP_METHOD_GeneralizedIterativeClosestPoint ,
    E_PCL_ICP_METHOD_IterativeClosestPoint ,
    E_PCL_ICP_METHOD_IterativeClosestPointWithNormals ,
    E_PCL_ICP_METHOD_IterativeClosestPointNonLinear ,
    E_PCL_ICP_METHOD_JointIterativeClosestPoint

};

struct PclCalculationParameter
{
    E_PCL_ICP_METHOD method;
    int maximumIterations;
    double transformationEpsilon;
    double euclideanFitnessEpsilon;
    double maxCorrespondenceDistance;
    double maxCalculateTime;
};


struct PclMatchDebugInfo
{
    bool isMatchSucess;
    double consumeTimeOut;//计算耗时　Ｓ
    E_PCL_ICP_METHOD method;
    int maximumIterations;
    double transformationEpsilon;
    double euclideanFitnessEpsilon;
    double matchScore;
    double pos_x;
    double pos_y;
    double pos_r;

};


//struct PointCloudData_3D//和ｇsoap同时定义导致可能ｃｏｒｅdump?
//{
//    std::string deviceName;
//    std::vector<double> point_x;
//    std::vector<double> point_y;
//    std::vector<double> point_z;
//};

enum E_BARRIER_TETECT_MODE
{
    E_BARRIER_TETECT_MODE_NONE,
    E_BARRIER_TETECT_MODE_FRONT,
    E_BARRIER_TETECT_MODE_BACK,
    E_BARRIER_TETECT_MODE_LEFT,
    E_BARRIER_TETECT_MODE_RIGHT,
    E_BARRIER_TETECT_MODE_ROTATION,
    E_BARRIER_TETECT_MODE_FRONT_LEFT,
    E_BARRIER_TETECT_MODE_FRONT_RIGHT,
    E_BARRIER_TETECT_MODE_BACK_LEFT,
    E_BARRIER_TETECT_MODE_BACK_RIGHT,
    E_BARRIER_TETECT_MODE_ALL
};



//struct LineMatchParameter
//{
//    double rho_distanceAccuracy;//pix
//    double theta_angleAccuracy;//rad
//    double threshold_pt;
//    double minLineLength;//pix
//    double maxLineGap;//pix
//};

struct VMarkDetectParameter
{
    double rho_distanceAccuracy;//pix
    double theta_angleAccuracy;//rad
    double threshold_pt;
    double minLineLength;//pix
    double maxLineGap;//pix

    double vmark_min_angle;//degree
    double vmark_max_angle;//degree
    double vmark_max_cross_distance;//m
    double vmark_allow_vDistance;//m
    double vmark_allow_vAngle;//degree

};




//struct VMarkInfo
//{
//    int vindex;
//    int vmarkType;
//    std::string mapName;
//    std::string comment;
//    double pose_x;//unit is mm
//    double pose_y;//unit is mm
//    double pose_r;//unit is degree
//};

struct StructLineParameter
{
    double minGap;//两条直线的中心距　，unit is m
    double maxGap;
    double minAngle;//两条直线的角度差 unit is rad
    double maxAngle;//两条直线的角度差
    double firstLineMinLength;//第一条直线最小长度
    double firstLineMaxLength;//第一条直线最大长度
//    double secondLineMinLength;//第二条直线最小长度
//    double secondLineMaxLength;//第二条直线最大长度
    double allowMaxDeltaDistance;//允许直线上最大点距离跳动，
//    bool isFittingLine;//是否拟合直线
//    int segmentJudgeMethod;//0光强阀值　１斜率　３光强对比度
//    double allowIntensityBias;
//    bool isDetectInflectionPoint;//是否计算拐点

};



/**
 * @brief The UserCommandData struct 用户命令存储结构体
 */
struct UserCommandData
{
    int targetPosition;//目标点
    std::string  comment;//注释
    std::string userIp;//发命令设备的ip
};

enum E_PATH_CONTROL_STRATEGY
{
    E_PATH_CONTROL_STRATEGY_DIFFERENTIAL=1,
    E_PATH_CONTROL_STRATEGY_MCCRUM=2
};

struct DragPara
{
    double controlKp;
    double thresholdTorque;
    double maxPositionError;
    int filterCount;
};


enum E_MOTION_ID
{
    E_MOTION_ID_NONE,
    E_MOTION_ID_ROTATE,
    E_MOTION_ID_MOVE_LINE,
    E_MOTION_ID_MOVE_WAIT_STEERING,


};

struct SegmentAtrribute
{
    double timeStamp;
    E_MOTION_ID motionId;

};

#endif //GLOBALDEFINE_H
